<template>
	<div>{{ text }}</div>
</template>

<script lang="ts" setup>
import { computed } from 'vue'

const props = defineProps({
	eventName: {
		type: String,
		default: ''
	},
	filterLeagueName: {
		type: String,
		default: ''
	}
})

const text = computed(() => {
	if (props.filterLeagueName) {
		return props.eventName.replace(props.filterLeagueName, '').trim().replace(RegExp('^-\W?'), '')
	} else {
		return props.eventName
	}
})
</script>
